package com.qf.service.impl;

import com.qf.entity.Dept;
import com.qf.mapper.DeptMapper;
import com.qf.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * User: key
 * ClassName:DeptServiceImpl
 * Date: 2023/5/27
 * Time: 11:10
 * description:
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> selectDept() {
        return deptMapper.selectDept();
    }

    @Override
    @Transactional
    public Integer addDept(Dept dept) {
        return deptMapper.addDept(dept);
    }

    @Override
    @Transactional
    public Integer deleteDept(Integer dno) {
        return deptMapper.deleteDept(dno);
    }
}
